All Functions Used So Far, Week 3

lm

{stats}

Fit linear models using least squares

names

{base}

Get or set names of an object

range

{base}

Return range of values

length

{base}

Returns number of elements in an object

group_tt

{tinytable}

Grouping in tinytable

ordered

{dplyr}

Create an ordered factor

is.na

{base}

Check if a value is NA/elements of vector are NA

data.frame

{base}

Create a data.frame from vectors

dnorm

{stats}

Density distribution for the normal distribution

install.packages

{utils}

Install R packages

mean

{base}

Get mean of a vector

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

predict

{stats}

Generate predicted values from model objects

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

nrow

{base}

Get number of rows of a data frame

var

{stats}

Calculate variance

expression

{base}

Used in plots to add symbols to axes

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

save_tt

{tinytable}

Save a tinytable object to a file

View

{base}

View a data frame

median

{stats}

Get median of a vector

seq

{base}

Create a sequence

nobs

{stats}

Return the number of observations in a model object

max

{base}

Get maximum of a vector

modelsummary

{modelsummary}

Creates regression and data tables

read_excel

{readxl}

Read an Excel file

filter

{dplyr}

Filter out rows of a data frame according to logical vector

mutate

{dplyr}

Create new variables

ungroup

{dplyr}

Resolve grouping created with “group_by”

tibble

{tibble}

A modern data frame from the tidyverse

min

{base}

Get minimum of a vector

cut

{base}

Convert Numeric to Factor

order

{base}

Get indexes that will sort a vector

sd

{stats}

Get standard deviation of a vector

glm

{base}

Fits generalized linear models

binomial

{base}

Family argument in glm()

list

{base}

Create a list object

c

{base}

Combine values/vectors into a vector

str

{utils}

Get the structure of an R object

head

{utils}

Show first 5 rows of a data frame

library

{base}

Load an R package

setwd

{base}

Set Working Directory

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

summary

{base}

Obtain summary statistics or detailed regression output

The end!